package com.lmiot.xyclick.Fragment;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.TextView;
import com.lmiot.xyclick.Util.SpFlag;
import com.bumptech.glide.Glide;
import com.lmiot.xyclick.AD.SDK.ADSDK;
import com.lmiot.xyclick.Activity.DenyActivity;
import com.lmiot.xyclick.Activity.WebViewActivity;
import com.lmiot.xyclick.Activity.WxGonActivity;
import com.lmiot.xyclick.App.MyApp;
import com.lmiot.xyclick.Bean.HomeBean;
import com.lmiot.xyclick.Bean.HomeTipBean;
import com.lkx.liandianqinew.R;
import com.lmiot.xyclick.Util.DataUtil;
import com.lmiot.xyclick.Util.DpUtil;
import com.lmiot.xyclick.Util.LayoutDialogUtil;
import com.lmiot.xyclick.View.MyGridView;
import com.yanzhenjie.recyclerview.swipe.SwipeMenuRecyclerView;
import com.yanzhenjie.recyclerview.swipe.widget.DefaultItemDecoration;
import com.youyi.yyviewsdklibrary.View.TitleBarView;
import java.util.ArrayList;
import java.util.List;

public class HomeFragment extends Fragment implements View.OnClickListener {
    private Dialog mBottomDailog;
    private Context mContext;
    private HomeAdapter mHomeAdapter;
    private List<HomeBean> mHomeBeanList;
    LinearLayout mIdDenyLayout;
    TextView mIdGon;
    ImageView mIdImg;
    TextView mIdName;
    ImageView mIdStateClose;
    LinearLayout mIdStateLayout;
    TitleBarView mIdTitleBar;
    private Intent mIntent;
    private boolean mIsFirstClick;
    private float mLastY;
    private LinearLayoutManager mLayoutManager;
    SwipeMenuRecyclerView mRecyclerView;

    public HomeFragment() {
    }

    public HomeFragment(Context context) {
        this.mContext = context;
    }

    @Override // android.support.v4.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.fragment_home, (ViewGroup) null);
        this.mIdTitleBar = (TitleBarView) inflate.findViewById(R.id.id_title_bar);
        this.mIdGon = (TextView) inflate.findViewById(R.id.id_gon);
        this.mIdImg = (ImageView) inflate.findViewById(R.id.id_img);
        this.mIdName = (TextView) inflate.findViewById(R.id.id_name);
        this.mIdDenyLayout = (LinearLayout) inflate.findViewById(R.id.id_deny_layout);
        this.mIdStateClose = (ImageView) inflate.findViewById(R.id.id_state_close);
        this.mIdStateLayout = (LinearLayout) inflate.findViewById(R.id.id_state_layout);
        this.mRecyclerView = (SwipeMenuRecyclerView) inflate.findViewById(R.id.recyclerView);
        this.mIdGon.setOnClickListener(this);
        this.mIdDenyLayout.setOnClickListener(this);
        this.mIdTitleBar.setOnItemClickListener(new TitleBarView.onItemClickListener() {
            @Override
            public void onBackClick(View view) {
            }

            @Override
            public void onTitleClick(View view) {
            }

            @Override
            public void onMenuClick(View view) {
                DataUtil.setUserState(MyApp.getContext(), true);
                HomeFragment.this.mIdStateLayout.setVisibility(View.VISIBLE);
                HomeFragment.this.mIdTitleBar.showIvMenu(false);
            }
        });
        if (ADSDK.mIsGDT) {
            this.mIdDenyLayout.setVisibility(View.GONE);
            this.mIdStateLayout.setVisibility(View.GONE);
        } else {
            this.mIdDenyLayout.setVisibility(View.VISIBLE);
            if (DataUtil.getUserState(MyApp.getContext())) {
                this.mIdStateLayout.setVisibility(View.VISIBLE);
                this.mIdTitleBar.showIvMenu(false);
            } else {
                this.mIdStateLayout.setVisibility(View.GONE);
                this.mIdTitleBar.showIvMenu(true);
            }
        }
        this.mIdStateClose.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                DataUtil.setUserState(MyApp.getContext(), false);
                HomeFragment.this.mIdStateLayout.setVisibility(View.GONE);
                HomeFragment.this.mIdTitleBar.showIvMenu(true);
            }
        });
        this.mRecyclerView.addItemDecoration(new DefaultItemDecoration(getResources().getColor(R.color.transparent), -1, DpUtil.dip2px(MyApp.getContext(), 10.0f), 99));
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this.mContext, 1, false);
        this.mLayoutManager = linearLayoutManager;
        this.mRecyclerView.setLayoutManager(linearLayoutManager);
        showListView();
        mIdTitleBar.setVisibility(View.VISIBLE);
        HomeFragment.this.mIdTitleBar.showIvMenu(true);
        return inflate;
    }

    private void showListView() {
        this.mHomeBeanList = getData();
        try {
            HomeAdapter homeAdapter = new HomeAdapter();
            this.mHomeAdapter = homeAdapter;
            this.mRecyclerView.setAdapter(homeAdapter);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private List<HomeBean> getData() {
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        arrayList2.add(new HomeTipBean("1", "什么是自动化？", 1));
        arrayList2.add(new HomeTipBean("2", "能做些什么？", 1));
        arrayList2.add(new HomeTipBean("3", "对手机的要求？", 1));
        arrayList.add(new HomeBean(R.drawable.ht01, "新手必读", arrayList2));
        ArrayList arrayList3 = new ArrayList();
        arrayList3.add(new HomeTipBean("5", "如何触发自动化？", 1));
        arrayList3.add(new HomeTipBean("6", "如何停止自动化？", 2));
        arrayList3.add(new HomeTipBean("4", "高级使用技巧", 2));
        arrayList.add(new HomeBean(R.drawable.ht02, "快速入门", arrayList3));
        ArrayList arrayList4 = new ArrayList();
        arrayList4.add(new HomeTipBean("30", "每次都要开无障碍？", 2));
        arrayList4.add(new HomeTipBean("7", "点击无反应？", 2));
        arrayList4.add(new HomeTipBean("8", "突然不能用？", 2));
        arrayList4.add(new HomeTipBean("31", "定时不能执行", 2));
        arrayList4.add(new HomeTipBean("32", "点截图无反应", 2));
        arrayList4.add(new HomeTipBean("33", "滑动无反应", 2));
        arrayList4.add(new HomeTipBean("9", "一直提示截图？", 2));
        arrayList4.add(new HomeTipBean("10", "开启权限被遮挡", 1));
        arrayList4.add(new HomeTipBean("11", "瞄准图标不显示？", 1));
        arrayList4.add(new HomeTipBean("12", "如何设置毫秒", 2));
        arrayList4.add(new HomeTipBean("13", "如何修改滑动速度", 2));
        arrayList4.add(new HomeTipBean("14", "图片识别不准", 2));
        arrayList4.add(new HomeTipBean("15", "滑动距离太短", 2));
        arrayList4.add(new HomeTipBean("16", "点击文字不执行", 1));
        arrayList4.add(new HomeTipBean("18", "如何分享自动化", 1));
        arrayList4.add(new HomeTipBean("20", "如何备份数据", 2));
        arrayList4.add(new HomeTipBean("25", "如何打开开发者选项", 2));
        arrayList4.add(new HomeTipBean("26", "如何打开开指针位置", 2));
        arrayList.add(new HomeBean(R.drawable.ht03, "常见问题", arrayList4));
        ArrayList arrayList5 = new ArrayList();
        arrayList5.add(new HomeTipBean("27", "条件判断", 2));
        arrayList5.add(new HomeTipBean("28", "文字识别加强版", 2));
        arrayList5.add(new HomeTipBean("29", "点击偏移", 2));
        arrayList.add(new HomeBean(R.drawable.ht07, "特色功能", arrayList5));
        return arrayList;
    }

    @Override // android.support.v4.app.Fragment
    public void onDestroyView() {
        super.onDestroyView();
    }

    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.id_deny_layout) {
            this.mContext.startActivity(new Intent(this.mContext, DenyActivity.class));
        } else if (id == R.id.id_gon) {
            this.mContext.startActivity(new Intent(this.mContext, WxGonActivity.class));
        }
    }

    public class HomeAdapter extends RecyclerView.Adapter {
        @Override // android.support.v7.widget.RecyclerView.Adapter
        public int getItemViewType(int i) {
            return 0;
        }

        public HomeAdapter() {
        }

        @Override // android.support.v7.widget.RecyclerView.Adapter
        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
            return new HomeViewHolder(View.inflate(HomeFragment.this.mContext, R.layout.item_cardview, null));
        }

        @Override // android.support.v7.widget.RecyclerView.Adapter
        public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {
            HomeViewHolder homeViewHolder = (HomeViewHolder) viewHolder;
            HomeBean homeBean = (HomeBean) HomeFragment.this.mHomeBeanList.get(i);
            Glide.with(HomeFragment.this.mContext).load(Integer.valueOf(homeBean.getImg())).into(homeViewHolder.img);
            homeViewHolder.name.setText(homeBean.getTitle());
            homeViewHolder.mGridView.setAdapter((ListAdapter) new TipAdapter(homeBean.getHomeTipBeanList()));
        }

        @Override // android.support.v7.widget.RecyclerView.Adapter
        public int getItemCount() {
            if (HomeFragment.this.mHomeBeanList == null) {
                return 0;
            }
            return HomeFragment.this.mHomeBeanList.size();
        }

        private class HomeViewHolder extends RecyclerView.ViewHolder {
            ImageView img;
            MyGridView mGridView;
            TextView name;

            public HomeViewHolder(View view) {
                super(view);
                this.img = (ImageView) view.findViewById(R.id.id_img);
                this.name = (TextView) view.findViewById(R.id.id_name);
                this.mGridView = (MyGridView) view.findViewById(R.id.id_gridview);
            }
        }
    }

    private class TipAdapter extends BaseAdapter {
        List<HomeTipBean> mList;

        public Object getItem(int i) {
            return null;
        }

        public long getItemId(int i) {
            return 0;
        }

        public TipAdapter(List<HomeTipBean> list) {
            this.mList = list;
        }

        public int getCount() {
            return this.mList.size();
        }

        public View getView(int i, View view, ViewGroup viewGroup) {
            View inflate = View.inflate(HomeFragment.this.mContext, R.layout.item_home_tip, null);
            TextView textView = (TextView) inflate.findViewById(R.id.id_text);
            final HomeTipBean homeTipBean = this.mList.get(i);
            textView.setText(homeTipBean.getName());
            if (homeTipBean.getColorLevel() == 2) {
                textView.setTextColor(-65536);
            }
            inflate.setOnClickListener(new View.OnClickListener() {
                /* class com.lmiot.xyclick.Fragment.HomeFragment.TipAdapter.AnonymousClass1 */

                public void onClick(View view) {
                    if (homeTipBean.getType().equals("30")) {
                        HomeFragment.this.mIntent = new Intent(HomeFragment.this.mContext, WebViewActivity.class);
                        HomeFragment.this.mIntent.putExtra(SpFlag.k, "无障碍保活");
                        HomeFragment.this.mIntent.putExtra("url", "http://www.youyikeji.tech:8098/web/#/p/1763af292c53e585e660ce12153510cd");
                        HomeFragment.this.startActivity(HomeFragment.this.mIntent);
                    } else if (homeTipBean.getType().equals("4")) {
                        HomeFragment.this.mIntent = new Intent(HomeFragment.this.mContext, WebViewActivity.class);
                        HomeFragment.this.mIntent.putExtra(SpFlag.k, "常见问题");
                        HomeFragment.this.mIntent.putExtra("url", "http://www.youyikeji.tech:8098/web/#/p/e9d521ea8485f5ce438b2978097f4dc0");
                        HomeFragment.this.startActivity(HomeFragment.this.mIntent);
                    } else {
                        HomeFragment.this.mBottomDailog = LayoutDialogUtil.createBottomDailog(HomeFragment.this.mContext, R.layout.dialog_bottom_help);
                        TextView textView = (TextView) HomeFragment.this.mBottomDailog.findViewById(R.id.tv_title);
                        textView.setText(homeTipBean.getName());
                        textView.setText(homeTipBean.getName());
                        HomeFragment.this.setDetail((TextView) HomeFragment.this.mBottomDailog.findViewById(R.id.id_text_detail), (ImageView) HomeFragment.this.mBottomDailog.findViewById(R.id.id_img_detail), homeTipBean);
                        ((ImageView) HomeFragment.this.mBottomDailog.findViewById(R.id.id_close)).setOnClickListener(new View.OnClickListener() {
                            /* class com.lmiot.xyclick.Fragment.HomeFragment.TipAdapter.AnonymousClass1.AnonymousClass1 */

                            public void onClick(View view) {
                                HomeFragment.this.mBottomDailog.dismiss();
                            }
                        });
                    }
                }
            });
            return inflate;
        }
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void setDetail(TextView textView, ImageView imageView, HomeTipBean homeTipBean) {
        String type = homeTipBean.getType();
        type.hashCode();
        char c = 65535;
        switch (type.hashCode()) {
            case 49:
                if (type.equals("1")) {
                    c = 0;
                    break;
                }
                break;
            case 50:
                if (type.equals("2")) {
                    c = 1;
                    break;
                }
                break;
            case 51:
                if (type.equals("3")) {
                    c = 2;
                    break;
                }
                break;
            case 52:
                if (type.equals("4")) {
                    c = 3;
                    break;
                }
                break;
            case 53:
                if (type.equals("5")) {
                    c = 4;
                    break;
                }
                break;
            case 54:
                if (type.equals("6")) {
                    c = 5;
                    break;
                }
                break;
            case 55:
                if (type.equals("7")) {
                    c = 6;
                    break;
                }
                break;
            case 56:
                if (type.equals("8")) {
                    c = 7;
                    break;
                }
                break;
            case 57:
                if (type.equals("9")) {
                    c = '\b';
                    break;
                }
                break;
            case 1567:
                if (type.equals("10")) {
                    c = '\t';
                    break;
                }
                break;
            case 1568:
                if (type.equals("11")) {
                    c = '\n';
                    break;
                }
                break;
            case 1569:
                if (type.equals("12")) {
                    c = 11;
                    break;
                }
                break;
            case 1570:
                if (type.equals("13")) {
                    c = '\f';
                    break;
                }
                break;
            case 1571:
                if (type.equals("14")) {
                    c = '\r';
                    break;
                }
                break;
            case 1572:
                if (type.equals("15")) {
                    c = 14;
                    break;
                }
                break;
            case 1573:
                if (type.equals("16")) {
                    c = 15;
                    break;
                }
                break;
            case 1574:
                if (type.equals("17")) {
                    c = 16;
                    break;
                }
                break;
            case 1575:
                if (type.equals("18")) {
                    c = 17;
                    break;
                }
                break;
            case 1576:
                if (type.equals("19")) {
                    c = 18;
                    break;
                }
                break;
            case 1598:
                if (type.equals("20")) {
                    c = 19;
                    break;
                }
                break;
            case 1599:
                if (type.equals("21")) {
                    c = 20;
                    break;
                }
                break;
            case 1600:
                if (type.equals("22")) {
                    c = 21;
                    break;
                }
                break;
            case 1601:
                if (type.equals("23")) {
                    c = 22;
                    break;
                }
                break;
            case 1602:
                if (type.equals("24")) {
                    c = 23;
                    break;
                }
                break;
            case 1603:
                if (type.equals("25")) {
                    c = 24;
                    break;
                }
                break;
            case 1604:
                if (type.equals("26")) {
                    c = 25;
                    break;
                }
                break;
            case 1605:
                if (type.equals("27")) {
                    c = 26;
                    break;
                }
                break;
            case 1606:
                if (type.equals("28")) {
                    c = 27;
                    break;
                }
                break;
            case 1607:
                if (type.equals("29")) {
                    c = 28;
                    break;
                }
                break;
            case 1629:
                if (type.equals("30")) {
                    c = 29;
                    break;
                }
                break;
            case 1630:
                if (type.equals("31")) {
                    c = 30;
                    break;
                }
                break;
            case 1631:
                if (type.equals("32")) {
                    c = 31;
                    break;
                }
                break;
            case 1632:
                if (type.equals("33")) {
                    c = ' ';
                    break;
                }
                break;
        }
        switch (c) {
            case 0:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【自动化】：\n是指在用户授权并了解的情况下，自己创建一组连续的动作指令，然后通过手动或自动触发的方式，让这一系列动作自动执行。\n\n【设计初衷】：\n智能手机的普及给我们带来了极大大方便，但我们用在智能手机上的时间也日益增加，而这其中有很大一部分动作是重复的。为了解决这个问题，给用户节省更多的时间，我们特意开发了这款自动化工具。\n\n【举个例子】：\n用户将打开朋友圈的几个动作组合成“一键访问朋友圈”的自动化，那么用户以后每天只需要手动点击这个自动化就可以快速打开朋友圈，而无需点击重复的的动作。\n\n");
                return;
            case 1:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("1.一键打开健康码；\n\n2.一键给亲人拨号；\n\n3.一键打开蓝牙播放音乐；\n\n4.一键设置晚安模式；\n\n5.一键自动导航回家；\n\n");
                return;
            case 2:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("1.Android 7.0以上；\n\n2.需要开启无障碍开关；\n\n3.内存建议2G以上；\n\n4.手机无需ROOT；\n\n");
                return;
            case 3:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【步骤说明】：\n\n1.点击添加；\n\n2.输入名称和重复次数；\n\n3.选择动作；\n\n4.点击保存。");
                return;
            case 4:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【四种触发方式】：\n\n1.手动点击方式；\n\n2.定时执行方式；\n\n3.通知触发方式；\n\n4.点击桌面快捷方式。");
                return;
            case 5:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【三种停止方式】：\n\n1.长按音量-；\n\n2.通知栏停止；\n\n3.悬浮球停止；");
                return;
            case 6:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n点击执行后，只看到红色点闪烁，实际并没有点击；\n\n\n【处理方式】：\n\n1.确认手机系统只Android 7.0以上；\n\n2.确认手机无障碍功能已经开启；\n\n3.按顺序执行以下操作：关闭无障碍开关——重启手机——开启无障碍；\n\n");
                return;
            case 7:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n刚开始几天好好点，突然就不能用了，点击也没反应；\n\n\n【处理方式】：\n\n此种情况一般由于无障碍功能失效引起的，需按以下步骤操作：关闭无障碍开关——重启手机——开启无障碍。\n\n还是不行？那就多操作几次看看，因为只有这一个原因了。\n\n");
                return;
            case '\b':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.VISIBLE);
                textView.setText("【问题描述】：\n\n当动作中有图片点击或条件判断时，会一直提示截图；\n\n\n【处理方式】：\n\n部分手机会有个隐藏当记住勾选框，点击即可（参考下图）");
                Glide.with(this.mContext).load(Integer.valueOf((int) R.drawable.hide_check)).into(imageView);
                return;
            case '\t':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.VISIBLE);
                textView.setText("【问题描述】：\n\n无法开启无障碍开关，提示被遮挡（参考下图）；\n\n\n【处理方式】：\n\n1.关闭手机底部的虚拟导航；\n\n;2.关闭其他有悬浮球功能的软件；\n\n3.重启手机，再次操作");
                Glide.with(this.mContext).load(Integer.valueOf((int) R.drawable.hide_open)).into(imageView);
                return;
            case '\n':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n点击添加动作后，蓝色瞄准图标不出现；\n\n\n【处理方式】：\n\n此种情况由于权限还没开启，打开手机设置——应用管理——权限——允许出现在其他应用上。\n\n");
                return;
            case 11:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.VISIBLE);
                textView.setText("【问题描述】：\n\n时间默认是1秒，能不能设置成毫秒？；\n\n\n【处理方式】：\n\n点击首页——右上角——自动化设置——启用毫秒（参考下图）\n\n");
                Glide.with(this.mContext).load(Integer.valueOf((int) R.drawable.open_ms)).into(imageView);
                return;
            case '\f':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n默认的滑动速度太慢，能否修改？；\n\n\n【处理方式】：\n\n点击首页——右上角——自动化设置——设置模拟滑动速度）\n\n");
                return;
            case '\r':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n图片识别不准，怎么修改？；\n\n\n【处理方式】：\n\n点击首页——右上角——自动化设置——设置图片相似度）\n\n");
                return;
            case 14:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n有些界面只能滑动到一半，怎么处理？；\n\n\n【处理方式】：\n\n1.点击添加动作；\n\n2.移动蓝色瞄准图标到起点位置；\n\n3.选择动作：模拟滑动起点；\n\n4.移动蓝色瞄准图标到终点位置；\n\n5.选择动作：模拟滑动终点点；\n\n4.保存。");
                return;
            case 15:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n有些文字，自动点击不了，怎么处理？；\n\n\n【处理方式】：\n\n1.默认的自动点击屏幕文字只能识别安卓原生文字；\n\n2.图片和网页之类的文字是无法直接识别的；\n\n3.建议采用动作：点击屏幕文字（加强版）；\n\n");
                return;
            case 16:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n想用语音控制助手自动执行，应该怎么操作？；\n\n\n【处理方式】：\n\n1.点击语音图标——右上角叹号；\n\n2.开启语音唤醒；\n\n3.唤醒后，直接说出自动化的名称即可执行；\n\n");
                return;
            case 17:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n想将自己编辑好的自动化发送给朋友，应该怎么操作？；\n\n\n【处理方式】：\n\n1.首页——自动化列表；\n\n2.点击最右边的菜单——分享自动化；\n\n3.输入设备ID，点击确定即可；\n\n注意：VIP之间才能分享自动化数据；\n\n");
                return;
            case 18:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n发现软件做到还不错，想开通VIP支持下作者，应该怎么操作？；\n\n\n【处理方式】：\n\n1.设置——开通VIP；\n\n2.付款并备注用户ID；\n\n3.返回设置处刷新数据；\n\n注意：VIP目前为手动开通，可能有一定延时；\n\n");
                return;
            case 19:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n担心数据丢失，或者想要卸载软件，该怎么备份数据？；\n\n\n【处理方式】：\n\n1.点首页——右上角第二个按钮；\n\n2.选择备份数据（本地）；\n\n3.恢复时，选择恢复数据（本地）；\n\n");
                return;
            case 20:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n我换了一个手机，但VIP这个怎么转移过去？；\n\n\n【处理方式】：\n\n1.准备好新手机ID；\n\n2.准备好旧手机ID；\n\n3.准备好付款截图；\n\n4.联系作者，申请转移；\n\n");
                return;
            case 21:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.VISIBLE);
                textView.setText("【简介】：\n\n之前有不少用户提到：作者，我不会配置，我只需要在游戏中无限循环点击一个地方就可以，这种有没有简单的实现方式？基于此需求，我们推出了无限点击小手，用户只需要把该小手图标拖动到要点击的地方，然后点击执行即可\n\n\n【使用步骤】；\n\n1.首页——悬浮球——右上角；\n\n2.最后一项：开启无限点击小手；\n\n3.将小手图标拖动到要点击的地方；\n\n4.点击——开始执行；\n\n");
                Glide.with(this.mContext).load(Integer.valueOf((int) R.drawable.th_hand)).into(imageView);
                return;
            case 22:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【简介】：\n\n悬浮球的设计初衷，是为了追求更高级的便捷性。想象一下，无需打开应用，只需要点击一下悬浮球即可：打开微信朋友圈、自动打开蓝牙并播放音乐、自动进行打卡签到等各种便捷操作。而且配置起来也不复杂，用户只需点击不同的手势即可进入配置。面对如此实用的功能，还在等什么，赶紧去体验吧。\n\n\n【应用场景】；\n\n1.执行某个自动化；\n\n2.停止执行自动化；\n\n3.快速进行拨号操作；\n\n4.一键打开某个应用；\n\n");
                return;
            case 23:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【简介】：\n\n智能语音，想必大家都熟悉了，但目前大部分的智能语音功能都是预设好的，也就无法帮用户实现各种复杂操作。因此，我们加入了语音控制部分，用户完成可以通过语音唤醒+说出自动化的名称进行各种复杂的语音控制场景。\n\n\n【应用场景】；\n\n1.驾驶时进行语音控制；\n\n2.作为智能音箱使用；\n\n3.配合智能家居实现语音控制电器；\n\n");
                return;
            case 24:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n手机默认不打开开发者模式，我该怎么打开？；\n\n\n【处理方式】：\n\n1.打开——手机系统设置；\n\n2.找到——关于手机(或全部参数）；\n\n3.找到——版本号(或xx版本)；\n\n4.对着版本号连续点击5下；\n\n");
                return;
            case 25:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n如何打开指针位置，以便查看手机某个点对坐标；\n\n\n【处理方式】：\n\n1.前提——确认开发者模式已经打开；\n\n2.打开——系统设置；\n\n3.找到——开发者选项；\n\n4.找到——指针位置，然后打开；\n\n");
                return;
            case 26:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【简介】：\n\n条件判断，顾名思义，就是通过判断某个条件是否成立，然后再执行对应对自动化功能。比如：要检测到某个文字出现后再执行自动化，或者判断数字大小是否在范围内再执行自动化。\n\n\n【常用条件判断】；\n\n1.文字条件；\n\n2.图片条件；\n\n3.数字大小条件；\n\n4.时间条件；\n\n5.位置条件；\n\n6.颜色条件；\n\n7.高级条件语句；\n\n");
                return;
            case 27:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【简介】：\n\n普通文字识别只能针对安卓原生文字，而文字识别加强版可以识别图片文字、网页文字和app自定义控件的字体等。\n\n\n【适用场景】；\n\n1.图片文字；\n\n2.网页文字；\n\n3.app内自定义文字；\n\n4.其他肉眼清晰可辨字体；\n\n");
                return;
            case 28:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【简介】：\n\n有时候我们需要点击的坐标并非当前识别目标的坐标，而是向旁边偏移了部分距离的坐标，那么，针对这种情况，我们可以用点击偏移来实现。\n\n\n【适用场景】；\n\n1.针对目标文字进行点击偏移；\n\n2.针对目标图片进行点击偏移；\n\n");
                return;
            case 29:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n每次打开APP，或锁屏一段时间后，都需要重新开启无障碍，怎么操作才可以一直保持无障碍开启？；\n\n\n【处理方式】：\n\n1.自动化设置——忽略电池优化；\n\n2.锁定到最近任务栏(不懂自行百度)；\n\n3.应用管理——权限——允许自启动；\n\n4.添加桌面小部件——连点器；\n\n");
                return;
            case 30:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\nAPP锁屏或黑屏后，执行定时无反应？；\n\n\n【处理方式】：\n\n1.自动化设置——忽略电池优化；\n\n2.锁定到最近任务栏(不懂自行百度)；\n\n3.应用管理——权限——允许自启动；\n\n4.添加桌面小部件——连点器；\n\n");
                return;
            case 31:
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n添加动作，点击截图无反应？；\n\n\n【处理方式】：\n\n1.应用权限——允许出现在其他应用上；\n\n2.应用权限——允许后台弹出窗口(小米)；\n\n");
                return;
            case ' ':
                textView.setVisibility(View.VISIBLE);
                imageView.setVisibility(View.GONE);
                textView.setText("【问题描述】：\n\n模拟点击可以执行，但滑动没反应？；\n\n\n【处理方式】：\n\n1.自动化设置——修改模拟滑动速度，如：200ms；\n\n2.用动作：模拟从A滑动到B；\n\n");
                return;
            default:
                return;
        }
    }
}
